// Package types define the structure of request parameters and return results in this package
package types

import (
	"time"

	"github.com/zhufuyi/sponge/pkg/mysql/query"
)

var _ time.Time

// CreateTkMemberOpenIDChangeLogRequest create params
// todo fill in the binding rules https://github.com/go-playground/validator
type CreateTkMemberOpenIDChangeLogRequest struct {
	UserID  int    `json:"user_id" binding:""` // 用户ID
	OpenID  string `json:"open_id" binding:""`
	UnionID string `json:"union_id" binding:""`
}

// UpdateTkMemberOpenIDChangeLogByIDRequest update params
type UpdateTkMemberOpenIDChangeLogByIDRequest struct {
	ID uint64 `json:"id" binding:""` // uint64 id

	UserID  int    `json:"user_id" binding:""` // 用户ID
	OpenID  string `json:"open_id" binding:""`
	UnionID string `json:"union_id" binding:""`
}

// GetTkMemberOpenIDChangeLogByIDRespond respond detail
type GetTkMemberOpenIDChangeLogByIDRespond struct {
	ID string `json:"id"` // convert to string id

	UserID    int       `json:"user_id"` // 用户ID
	OpenID    string    `json:"open_id"`
	UnionID   string    `json:"union_id"`
	UpdatedAt time.Time `json:"updated_at"`
	CreatedAt time.Time `json:"created_at"` // 创建时间
}

// DeleteTkMemberOpenIDChangeLogsByIDsRequest request form ids
type DeleteTkMemberOpenIDChangeLogsByIDsRequest struct {
	IDs []uint64 `json:"ids" binding:"min=1"` // id list
}

// GetTkMemberOpenIDChangeLogsByIDsRequest request form ids
type GetTkMemberOpenIDChangeLogsByIDsRequest struct {
	IDs []uint64 `json:"ids" binding:"min=1"` // id list
}

// GetTkMemberOpenIDChangeLogsRequest request form params
type GetTkMemberOpenIDChangeLogsRequest struct {
	query.Params // query parameters
}

// ListTkMemberOpenIDChangeLogsRespond list data
type ListTkMemberOpenIDChangeLogsRespond []struct {
	GetTkMemberOpenIDChangeLogByIDRespond
}
